

package com.dfd.mango.admin.config;

import com.dfd.mango.admin.service.SysCaptchaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时任务
 */
@Slf4j
@Component
public class ScheduleJob{
    @Autowired
    private SysCaptchaService captchaService;

    @Scheduled(cron = "0 0/1 * * * ?")
    public void deleteCaptcha() {
        log.info("准备删除验证码信息");
        captchaService.deleteCaptcha();
        log.info("删除完毕！");
    }

}
